<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Mini Vue</title>
    <script src="./vue/dep.js"></script>
    <script src="./vue/watcher.js"></script>
    <script src="./vue/compiler.js"></script>
    <script src="./vue/observer.js"></script>
    <script src="./vue/vue.js"></script>
</head>

<body>
    <div id="app">
        <h1 v-on:click="myClick">点击事件</h1>
        <h3>{{ msg }}</h3>
        <h1>v-text</h1>
        <div v-text="msg"></div>
        <h1 v-html='html'></h1>
        <input type="text" v-model="msg">
        <input type="text" v-model="count">
        <h1>{{dog.name}}</h1>
    </div>
</body>
<script>
    let vm = new Vue({
        el: '#app',
        data: {
            msg: 'object1111',
            dog: {
                name: ''
            },
            html: '<button style="color: pink; font-size: 26px">v-html</button>'
        },
        methods: {
            myClick() {
                alert('点击事件')
            },
            clickHandler() {
                this.dog
                    // 该 name 属性是否是响应式的
                this.$set(dog, name, 'Trump')
            }
        }
    })
</script>

</html>